-- GENERATED SPELL FOR [Quel'dorei Magewraith] --


function spell0_17612(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(31595,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17612', 2500, 1)
end

function spell1_17612(pUnit, Event) --@Arcane Weakness,n/a--
pUnit:FullCastSpellOnTarget(31604,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17612', 1000, 1)
end

function spell2_17612(pUnit, Event) --@Counterspell,n/a--
pUnit:FullCastSpellOnTarget(31596,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17612', 6274, 1)
end

function spell3_17612(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(11921,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17612', 3000, 1)
end

function spell4_17612(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(11436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17612', 10000, 1)
end

function Sorts_17612(pUnit, Event)
local choix_sorts_17612 = math.random(0, 4)
if choix_sorts_17612 == 0 then
pUnit:RegisterEvent('spell0_17612', 1, 1)
end
if choix_sorts_17612 == 1 then
pUnit:RegisterEvent('spell1_17612', 1, 1)
end
if choix_sorts_17612 == 2 then
pUnit:RegisterEvent('spell2_17612', 1, 1)
end
if choix_sorts_17612 == 3 then
pUnit:RegisterEvent('spell3_17612', 1, 1)
end
if choix_sorts_17612 == 4 then
pUnit:RegisterEvent('spell4_17612', 1, 1)
end
end

function mob17612_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17612', math.random(1500, 3000), 1)
end

function mob17612_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17612_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17612_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17612, 1, 'mob17612_Action')
RegisterUnitEvent(17612, 2, 'mob17612_Leave')
RegisterUnitEvent(17612, 3, 'mob17612_Kill')
RegisterUnitEvent(17612, 4, 'mob17612_Die')
